import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-10-19  08:40
 */
public class Test {
    public static void main(String[] args) {
        int[] ary = {1,3,5,7,9,2,4,6,8,0};
        for(int i = 0; i < ary.length-1; i++) {
            for(int j = 0; j < ary.length-i-1; j++) {
                if(ary[j] > ary[j+1]) {
                    int temp = ary[j];
                    ary[j] = ary[j+1];
                    ary[j+1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(ary));
    }
}
